package jmind.core.spring;

import jmind.base.lang.IProperties;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;

import java.util.Map;

/**
 * @Author: xieweibo
 * @Date: 2018/6/12
 */
public class SpringProperties  implements IProperties,EnvironmentAware {
    @Override
    public String getProperty(String s) {
        return environment.getProperty(s);
    }

    @Override
    public boolean hasProperty(String s) {
        return environment.containsProperty(s);
    }

    @Override
    public String getProperty(String s, String s1) {
        return environment.getProperty(s,s1);
    }

    @Override
    public Map<String, String> getProperties() {
        return null;
    }


    private Environment environment;

    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }

}
